<?php
 
 // $ac1="100019";
 // $pw1="jjl4yk11f82ce6c0f33a5c003f2fec56"; //票付通账号跟密码
// $s1=new SoapClient("http://open.12301.cc/openService/MXSE.wsdl",array('encoding' =>'UTF-8','cache_wsdl' => 0));//票付通接口地址
$s1=new SoapClient("http://112.124.14.164/open/openService/MXSE.wsdl",array('encoding' =>'UTF-8','cache_wsdl' => 0));//票付通接口地址

//查询景区列表
// $txt = $s1->__soapCall("Get_ScenicSpot_List",array("ac"=>$ac1,"pw"=>$pw1,"in0"=>1,"in1"=>1000));
// $arr =simplexml_load_string($txt);
// print_r($txt);
// exit;

// 查询景区详细信息
// print_r($s1->__soapCall("Get_ScenicSpot_Info",array("ac"=>$ac1,"pw"=>$pw1,"in0"=>6420)));
// exit;

// 门票列表
//print_r($s1->__soapCall("Get_Ticket_List",array("ac"=>$ac1,"pw"=>$pw1,"in0"=>4891,"in1"=>"")));
//exit;
//动态价格、库存上限获取
// print_r($s1->__soapCall("Dynamic_Price_And_Storage",array("ac"=>$ac1,"pw"=>$pw1,"in0"=>22854,"in1"=>"2015-10-13","in2"=>1,"in3"=>1,"in4"=>1)));

//提交订单
$namess = array('博文','梓晨','胤祥','瑞霖','明哲','天翊','凯瑞','健雄','耀杰','潇然','越彬','钰轩','智辉','俊驰','雨泽','烨磊','晟睿','文昊','黎昕','远航','旭尧','鸿涛','伟祺','荣轩','越泽','浩宇','瑾瑜','皓轩','擎苍','擎宇','志泽','子轩','睿渊','弘文','哲瀚','雨泽','楷瑞','建辉','晋鹏','天磊','绍辉','泽洋','鑫磊','鹏煊','昊强','伟宸','博超','君浩','子骞','鹏涛','炎彬','鹤轩','越彬','风华','靖琪','明辉','伟诚','明轩','健柏','修杰','志泽','弘文','峻熙','嘉懿','煜城','懿轩','烨伟','苑博','伟泽','熠彤','鸿煊','博涛','烨霖','烨华','煜祺','智宸','正豪','昊然','明杰','立诚','立轩','立辉','峻熙','弘文','熠彤','鸿煊','烨霖','哲瀚','鑫鹏','昊天','思聪','展鹏','志强','炫明','雪松','思源','智渊','思淼','晓啸','天宇','浩然','文轩','鹭洋','振家','乐驹','晓博','文博','昊焱','立果','金鑫','锦程','嘉熙','鹏飞','子默','思远','浩轩','语堂','聪健','','梓萱','艾琳','妙涵','曼柔','瑾萱','梦婷','雪茹','海玲','佳瑶','梦琪','雅楠','瑞欣','妍姗');
$telss = array('13808797209','13888753517','13888296579','13808706739','13808793798','13808759129','13888156249','13888424078','13888926748','13808727026','13888703276','13888137279','13808703208','13888721675','13808791756','13808756976');
for($i=1;$i<=100;$i++){

	$code = rand(1,5);
	switch ($code)
	{
		case 1:
			$ac1="519847";
			$pw1="202e03d9a145ff9f147b2414f90ae457";
		break;
		
		case 2:
			$ac1="519850";
			$pw1="a6be9f89dcc6e35a4d06b04e6d116d28";
		break;	
		
		case 3:
			$ac1="519849";
			$pw1="01d9f1d0aaec226620814f7f94bd785d";
		break;	
		
		case 4:
			$ac1="519844";
			$pw1="36e14e47435bfc8bead4e472be90e26b";
		break;	
		
		case 5:
			$ac1="519845";
			$pw1="64ba9284624234c4e0906bb1a0d15c9e";
		break;
	}
	
 $nkey = rand(1,count($namess));
 $name = $namess[$nkey];
 $tkey = rand(1,count($telss));
 $tel = $telss[$tkey];
 $num = rand(1,6);
 
 print_r($s1->__soapCall("PFT_Order_Submit",array(
		 "ac"=>$ac1, //账号
		 "pw"=>$pw1, //密码
		 "in0"=>13721, //景区id
		 "in1"=>29450,//门票id
		 "in2"=>"",//远端订单号
		 "in3"=>100, //门票价格
		 "in4"=>$num,//数量
		 "in5"=>"2015-01-02",//游玩日期
		 "in6"=>$name, //客户姓名
		 "in7"=>$tel,//客户手机号
		 "in8"=>"", //联系人手机号
		 "in9"=>1,//是否发送短信（0发送1不发送）
		 "in10"=>2,//扣款方式（0使用账户余额2使用供应商处余额4现场支付
		 "in11"=>0,//下单方式（0正常下单1手机用户下单）
		 "in12"=>"",//集合地点
		 "in13"=>"",//团号
		 "in14"=>0,//联票ID
		 "in15"=>0,//套票ID
		 "in16"=>62379,//供应商id
		 "in17"=>"350321199123456789" //身份证
		 )
 ));
}
exit;
// 订单查询
// print_r($s1->__soapCall("Order_Globle_Search",array("ac"=>$ac1,"pw"=>$pw1,"in0"=>"616007","in1"=>"","in2"=>"","in3"=>"","in4"=>"","in5"=>"","in6"=>"","in7"=>"","in8"=>"","in9"=>"","in10"=>"","in11"=>"","in12"=>"","in13"=>"","in14"=>"","in15"=>"","in16"=>"","in17"=>"","in18"=>"","in19"=>1,"in20"=>"","in21"=>"","in22"=>"0","in23"=>"","in24"=>"","in25"=>"","in26"=>1))); 

//订单短信发送、重发接口
// print_r($s1->__soapCall("reSend_SMS_Global_PL",array("ac"=>$ac1,"pw"=>$pw1,"in0"=>'2814777')));

//修改、取消订单
//print_r($s1->__soapCall("Order_Change_Pro",array("ac"=>$ac1,"pw"=>$pw1,"in0"=>'2911567',"in1"=>0,"in2"=>'')));

//凭证码查看
// print_r($s1->__soapCall("Terminal_Code_Verify",array("ac"=>$ac1,"pw"=>$pw1,"in0"=>"2814777")));

//资金余额查看
// print_r($s1->__soapCall("PFT_Member_Fund",array("ac"=>$ac1,"pw"=>$pw1,"in0"=>1,"in1"=>27491)));

// print_r($s1->__soapCall("PFT_Member_Relationship",array("ac"=>$ac1,"pw"=>$pw1,"in0"=>2)));

?>